package com.sdgakj.enums;

public enum EnumUserType {
	CUSTOMOR("user", "普通用户"), ADMIN("admin", "管理员"),SURVEYOR("surveyor","检测师"),ASSIGNUSER("assignuser","招商"),
	SHOPKEEPER("shopkeeper","店长"),CLERT("clert","店员"),MERCHANT("merchant","个人商家"),SERVICEHOTLINE("servicetel","400-169-7799");

	private String code;

	private String name;

	private EnumUserType(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EnumUserType getEnum(String value) {
		for (EnumUserType e : EnumUserType.values()) {
			if (value.equals(e.getCode())) {
				return e;
			}
		}
		return null;
	}
}
